﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using System.IO;
using System.Windows.Markup;

namespace DreamLand.UI.MagicBook
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private MediaElement myVideo;
        private MediaElement myGiangBai;

        public MainWindow()
        {
            InitializeComponent();

            //videoTest.Play();

            //StreamReader sr = new StreamReader("FlowDocument1.xaml");            

            //DependencyObject rootObject = System.Windows.Markup.XamlReader.Load(sr.BaseStream) as DependencyObject;

            //FlowDocument fdoc = (FlowDocument)rootObject;

            //Book1.ItemsSource = new List<dynamic> { fdoc, fdoc };

        }

        private void MediaElement_Loaded(object sender, RoutedEventArgs e)
        {
            myVideo = sender as MediaElement;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            myVideo.Play();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            myVideo.Pause();
        }

        private void MediaElement_Loaded_1(object sender, RoutedEventArgs e)
        {
            myGiangBai = sender as MediaElement;
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            myGiangBai.Play();
        }

        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            myGiangBai.Pause();
        }

        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            MultiPointQuiz quiz = new MultiPointQuiz();
            quiz.Show();
        }
    }
}
